﻿
//
//  CmdRouter.h
//  websocketserver
//
//  Created by cl.zhan on 17/5/26.
//  email:zhanchonglongba@126.com/690759587
//
//


#ifndef CMDROUTER_H_H_
#define CMDROUTER_H_H_

#include <QObject>
#include <QJsonDocument>
#include <QJsonArray>
#include <QJsonObject>
#include "JsonRpc/AbstractServerHandle.h"


class HttpClientConnection;

//Command dispenser, need to improve their own need to do the content

class CmdRouter :public AbstractServerHandle<CmdRouter>
{
//    Q_OBJECT
public:
    CmdRouter ();
    CmdRouter(HttpClientConnection * _Connection);
    ~CmdRouter();
    void        sendJsonString          (QJsonObject         jsonRoot);
    void        reLogin                 (QJsonDocument      &jdc,QString &strOut);
    void       doPullStream             (QJsonDocument      &jdc,QString &strOut);
    void       DoStartPullStream        (QJsonDocument      &jdc,QString &strOut);
    void       DoStopPullStream         (QJsonDocument      &jdc,QString &strOut);
    void       DoStartPushStream        (QJsonDocument      &jdc,QString &strOut);
    void       DoStopPushStream         (QJsonDocument      &jdc,QString &strOut);
    void       DoGetLiveInfo            (QJsonDocument      &jdc,QString &strOut);


//public slots:

private:
    HttpClientConnection     * m_Connection;
};

#endif // CMDROUTER_H_H_
